Color processing method and apparatus

ABSTRACT

In order to implement color matching with higher precision, a device that handles object colors and a device that handles light-source colors must be separately processed. Hence, when the device type is a device that handles light-source colors, control is made so as not to perform processing (forward color appearance model conversion and inverse color appearance model conversion) for converting colorimetric conditions of a colorimetric value file into viewing conditions. When the device type is a device that handles object colors, the processing for converting the colorimetric conditions of the colorimetric value file into the viewing conditions is performed, and a profile is created from the colorimetric values.

TECHNICAL FIELD

The present invention relates to color processing that performs colormatching processing according to the viewing conditions.

BACKGROUND ART

FIG. 1 is a conceptual view of general color matching.

Input data as RGB data is converted into XYZ data on adevice-independent color space by an input profile. Since colors outsidethe color gamut of an output device cannot be expressed by the outputdevice, the input data converted into data on the device-independentcolor space undergoes gamut mapping, so that all such colors fall withinthe color reproduction range of the output device. After gamut mapping,the input data is converted from the data on the device-independentcolor space into CMYK data on a color space depending on the outputdevice.

In color matching, a reference white point and ambient light are fixed.For example, in profiles specified by International Color Consortium(ICC), the Profile Connection Space (PCS) that connects profiles aredefined by XYZ values and Lab values of the D50 reference. For thisreason, upon viewing an input document or printout under a light sourcewith the D50 characteristics, correct color reproduction is guaranteed.Under light sources with other characteristics, correct colorreproduction is not guaranteed.

In consideration of this, the present applicant has proposed colormatching according to the viewing conditions (Japanese Patent Laid-OpenNo. 2000-50086). This proposal is color matching that uses forward colorappearance conversion according to the viewing conditions on the sourceside, and inverse color appearance conversion according to the viewingconditions on the destination side.

However, since the technique disclosed in Japanese Patent Laid-Open No.2000-50086 (U.S. Pat. No. 6,542,634) performs processing withoutdistinguishing a device which handles object colors and that whichhandles light-source colors, there is room for improvement so as toimplement color matching with higher precision.

DISCLOSURE OF INVENTION

The first aspect of the present invention discloses a color processingmethod of performing color matching processing as correction processingusing viewing conditions and color conversion conditions calculated fromcolorimetric values of a device, the method comprising the steps of:

obtaining the viewing conditions;

converting colorimetric conditions of the colorimetric values into theviewing conditions;

determining a type of the device; and

controlling the conversion step based on a determination result of thedetermination step,

wherein the control step includes a step of controlling the conversionstep so as not to perform the conversion when the type of the device isa device that handles light-source colors, and controlling theconversion step so as to perform the conversion when the type of thedevice is a device that handles object colors.

The second aspect of the present invention discloses a color processingmethod comprising the steps of:

creating a first profile using XYZ values of an ambient light referencefor a device that handles object colors, wherein the first creation stepincludes a step of using a white point of ambient light as a white pointof viewing conditions; and

creating a second profile using XYZ values of a display device lightsource reference for a device that handles light-source colors, whereinthe second creation step includes a step of using, as a white point ofthe viewing conditions, a white point of a display device when anobserver gazes at an image on the display device, and a white pointbetween a white point of the display device and a white point of theambient light when the observer compares an image on the display devicewith an image on a reflecting document.

According to the present invention, conversions respectively suited to adevice which handles object colors and that which handles light-sourcecolors can be attained, thus implementing color matching with higherprecision.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual view of general color matching;

FIG. 2 a view for explaining a color appearance model used in aembodiment of the present invention;

FIG. 3 is a view for explaining color matching processing that handlesobject colors;

FIG. 4 is a block diagram showing the functional arrangement of theembodiment;

FIG. 5 is a block diagram showing the arrangement of an apparatus whichimplements the functional arrangement shown in FIG. 4;

FIG. 6 is a flowchart showing processing for recreating a conversion LUTcorresponding to ambient light;

FIG. 7 is a flowchart showing processing for updating a conversion LUTcorresponding to ambient light;

FIG. 8 is a flowchart showing processing for performing color spacecompression on a JCH or QMH color space;

FIG. 9 shows a dodecahedron that approximates a color gamut;

FIGS. 10A and 10B are views showing the concept of color spacecompression on a JCH color appearance space;

FIGS. 11A and 11B are views showing the concept of color spacecompression on a QMH color appearance space;

FIGS. 12A and 12B are views showing the concept of color spacecompression between different devices;

FIG. 13 is a flowchart showing processing for recreating a conversionLUT corresponding to ambient light;

FIG. 14 is a view showing the concept of color matching processing; and

FIG. 15 is a view for explaining color matching processing betweendevices which handle object colors, and that which utilizes acolorimetric value file.

BEST MODE FOR CARRYING OUT THE INVENTION

Image processing according to preferred embodiments of the presentinvention will be described in detail hereinafter with reference to theaccompanying drawings.

A color appearance model used in an embodiment to be describedhereinafter will be described first using FIG. 2.

As is known, colors perceived by a human ocular system result indifferent color appearance depending on various conditions such as adifference in illuminating light, the background on which a stimulussuch as a viewing subject is placed, and the like even when lightentering the eye remains the same.

For example, white illuminated by an incandescent lamp does not appearas red as the characteristics of light entering the eye, and isperceived as white. Of white placed on a black background and thatplaced on a bright background, white placed on the black backgroundlooks brighter. The former phenomenon is known as “color adaptation”,and the latter one is known as “contrast”. For this reason, a color mustbe displayed using a quantity corresponding to the degree ofphysiological activity of photoreceptor cells distributed on a retina.For this purpose, a color appearance model has been developed. TheCommission Internationale de l'Eclairage (CIE) recommends use ofCIECAM97s and CIECAM02. This color appearance model uses physiologicalthree primary colors of chromatic vision. For example, H (hue), J(lightness), and C (chroma) values or H (hue), Q (brightness), and M(colorfulness) values as correlation values of color appearancecalculated by CIECAM97s are considered as a color display methodindependent from the viewing conditions. By reproducing colors so thatH, J, and C values or H, Q, and M values match between devices,different viewing conditions of input and output images can becompensated.

The processing contents of forward conversion of the color appearancemodel CIECAM97s which performs correction processing (processing forconverting XYZ into HJC or HQM) according to the viewing conditions uponviewing an input image will be described below using FIG. 2.

As viewing condition information of an input image, the following valuesare set in step S160:

brightness La (cd/m²) of the adapting field;

XYZ as relative tristimulus values of a sample under the light-sourceconditions;

XwYwZw as relative tristimulus values of white light under thelight-source conditions; and

Yb as relative brightness of the background under the light-sourceconditions.

Also, based on the type of viewing conditions designated in step S180, aconstant c indicating the impact of surround, a chromatic inductionfactor Nc, a lightness contrast factor FLL, and a factor F of a degreeof adaptation are set in step S170.

Based on the input image viewing condition information set in steps S160and S170, the following processing is applied to XYZ values representingthe input image.

Based on three primary colors of Bradford considered as physiologicalthree primary colors of a human being, XYZ values are converted toobtain Bradford cone response values RGB (S100). Since human visualperception is not always completely adaptable to a viewing light source,a variable D indicating the degree of adaptation is calculated based onthe brightness level and ambient conditions (La and F). Based on thisvariable D and XwYwZw values, incomplete adaptation processing isapplied to the RGB values to convert them into RcGcBc values (S110).

Next, based on Hunt-Pointer-Estevez three primary colors considered asphysiological three primary colors of a human being, the RcGcBc valuesare converted to calculate Hunt-Pointer-Estevez cone response valuesR′G′B′ (S120). The degrees of adaptation of the R′G′B′ values based onstimulus intensity level are estimated to calculate adapted coneresponse values R′aG′aB′a according to both the sample and white (S130).In step S130, nonlinear response compression is made using a variable FLcalculated based on the brightness La of the adapting field.

Subsequently, in order to obtain the correlation with color perception,the following processing is executed.

Red-green and yellow-blue opposite color response values ab arecalculated from the R′aG′aB′a values (S140), and hue H is calculatedfrom the opposite color response values ab and an eccentricity factor(S150).

A background inducing coefficient n is calculated from Yw and therelative brightness Yb of the background, and achromatic color responsevalues A and Aw associated with both the sample and white are calculatedusing this background inducing coefficient n (S190). Next, lightness Jis calculated based on a coefficient z calculated from the backgroundinducing coefficient n and lightness contrast factor FLL, and A, Aw, andc (S151). Subsequently, saturation S is calculated from the chromaticinduction factor Nc (S153), chroma C is calculated from saturation S andlightness J (S152), and brightness Q is calculated from lightness J andwhite achromatic color response Aw (S154).

Also, colorfulness M is calculated from the variable FL and the constantc indicating the impact of surround (S155).

[Color Matching of Device that Handles Object Colors]

Color matching processing between devices (digital camera, scanner,printer, and the like) that handle the object colors of reflectingdocuments and the like will be described below.

FIG. 3 is a view for explaining color matching processing that handlesobject colors.

In FIG. 3, a conversion matrix or conversion lookup table (LUT) 11converts data depending on an input device into device-independent colorspace data based on the white point reference of ambient light on theinput side. A forward converter (CAM) 12 of the color appearance modelconverts the data obtained from the conversion LUT 11 into data on ahuman color appearance space JCh or QMh. JCh (or JCH) 13 is a colorappearance space relative to reference white of ambient light. QMh (orQMH) 14 is an absolute color appearance space whose dimensions changedepending on the illuminance level. An inverse converter (CAM⁻¹) 15 ofthe color appearance model converts the color space data of the humancolor appearance space JCh or QMh into device-independent color spacedata based on the white point reference of ambient light on the outputside. A conversion LUT 16 converts the data obtained from the inverseconverter 15 into color space data depending on an output device.

In general, a white point of ambient light under the viewing conditionsis different from that of a standard light source upon measuring a colortarget, color patch, or the like. For example, the standard light sourceused upon colorimetry is D50 or D65. However, ambient light uponactually viewing an image is not always D50 or D65 in a light booth, butis normally illuminating light of an incandescent lamp, fluorescentlamp, or the like, or light obtained by mixing illuminating light andsunlight. In the following description, assume that the light sourcecharacteristics of ambient light under the viewing conditions are D50,D65, and D93 for the sake of simplicity. However, in practice, the XYZvalues of a white point on a medium are set as a white point.

FIG. 4 is a block diagram showing the functional arrangement of thisembodiment.

Referring to FIG. 4, a data creation unit 41 creates data depending onviewing conditions 1 on the input side based on an input profile 42 andviewing conditions 1 on the input side. A color space compression modeselection unit 43 selects based on designation by the user or profilewhether gamut mapping is to be done on the JCH or QMH color space. Eachof gamut mapping units 44 and 45 performs gamut mapping of data on theJCH or QMH color appearance space based on an output profile 46. A datacreation unit 47 creates data depending on viewing conditions 2 on theoutput side based on the output profile 46 and viewing conditions 2 onthe output side. A color matching unit 48 performs color matching byutilizing the data depending on viewing conditions 1, gamut mappingdata, data depending on viewing conditions 2, and color appearancemodel.

FIG. 5 is a block diagram showing the arrangement of an apparatus whichimplements the functional arrangement shown in FIG. 4. Needless to say,the apparatus as shown in FIG. 5 is implemented by supplying softwarethat implements the functions shown in FIG. 4 to a general-purposecomputer apparatus such as a personal computer or the like. In thiscase, the software that implements the functions of this embodiment maybe included in an operating system (OS) of the computer apparatus or indriver software of input and output devices independently of the OS.

Referring to FIG. 5, a CPU 100 controls the operation of the overallapparatus in accordance with programs stored in a ROM 101, hard disk(HD) 106, and the like using a RAM 102 as a work memory. Furthermore,the CPU 100 executes various kinds of processing including theaforementioned processing associated with color matching. An inputinterface 103 is an interface for connecting an input device 104. A harddisk interface 105 is an interface for connecting the HD 106. A videointerface 107 is an interface for connecting a monitor 108. An outputinterface 109 is an interface for connecting an output device 110.

Note that the target input device of this embodiment includes variousimage input devices such as image sensing devices including a digitalstill camera, digital video camera, and the like, and image readersincluding an image scanner, film scanner, and the like. The outputdevice includes color monitors including a CRT, LCD, and the like, andimage output devices including a color printer, film recorder, and thelike.

As the interface, a general-purpose interface can be used. A serialinterface such as RS232C, RS422, or the like, a serial bus such asIEEE1394, USB, or the like, or a parallel interface such as SCSI, GPIB,IEEE1284, or the like can be used depending on the use applications.

Also, input and output profiles required to perform color matching arestored in the HD 106. However, the present invention is not limited tothe hard disk, and an optical disk such as a CD-R/RW, DVD±R/RW, or thelike may be used.

An example of color matching executed using the input and outputprofiles will be described below.

Creation of Data Depending on Viewing Conditions 1

The conversion LUT 11 is created using the data creation unit 41. As amethod of creating the conversion LUT 11, the following two methods areavailable. The first method is a method of recreating the conversion LUT11 corresponding to ambient light based on the relationship between theXYZ values (or Lab values) of a color target and the RGB values of aninput device, as shown in FIG. 6. The second method is a method ofupdating a conversion LUT used to convert a device RGB space into an XYZspace in the input profile 42 to the conversion LUT 11 corresponding toambient light, as shown in FIG. 7.

FIG. 6 is a flowchart showing processing for recreating the conversionLUT 11 corresponding to ambient light.

In order to recreate the conversion LUT 11 corresponding to ambientlight, a profile designated by the user is loaded from the input profile42 (S51). The input profile 42 stores in advance XYZ to RGB relationshipdata that associates the XYZ values (or Lab values) of a color targetwith device RGB values upon reading that color target by the inputdevice. This XYZ to RGB relationship data is extracted from the profile(S52). Since viewing conditions 1 are also stored in the profile, theyare extracted from the profile (S53).

Since the XYZ values of the XYZ to RGB relationship data extracted instep S52 are data which are determined with reference to D50 or D65 asreference light upon measuring the color target, the XYZ values of acolorimetric light source reference must be corrected to those of anambient light reference. Hence, the XYZ values of the colorimetric lightsource reference are converted into data on the human color appearancespace JCH using the color appearance model based on the white point (incase of the D50 reference) of the D50 light source, the illuminancelevel, the state of surrounding light, and the like as the colorimetricconditions. Furthermore, the converted values are inversely convertedagain into XYZ values using the color appearance model based on, e.g.,the white point of the D65 light source, the illuminance level, thestate of surrounding light, and the like as viewing conditions 1different from the colorimetric conditions, thus obtaining XYZ values ofthe ambient light reference (S54). In this way, the relationship betweenthe XYZ values of the ambient light reference and device RGB values canbe obtained. When an RGB to XYZ conversion matrix based on the XYZ toRGB relationship data is created, and is optimized by an iterationmethod or the like, a conversion LUT 11 corresponding to ambient lightcan be obtained (S55).

FIG. 7 is a flowchart showing processing for updating to the conversionLUT 11 corresponding to ambient light. Note that the same step numbersdenote the steps that execute the same processing as in FIG. 6, and adetailed description thereof will be omitted.

In general, an ICC profile for an input device stores a conversionmatrix (colorant Tag) or conversion LUT (AtoB0 Tag) required to performRGB to XYZ conversion. Hence, RGB to XYZ relationship data is extractedfrom the input profile 42 (S62).

The relationship between the XYZ values of the ambient light referenceand device RGB values is obtained (S54). Then, the conversion matrix(colorant Tag) or conversion LUT (AtoB0 Tag) in the input profile 42 isupdated (S66). In this manner, the conversion LUT 11 corresponding toambient light can be obtained.

Note that the example using the RGB to XYZ relationship data has beendescribed in FIGS. 6 and 7. However, the present invention is notlimited to this, and other device-independent color data such as RGB toLab relationship data and the like may be used.

Selection of Color Space Compression Mode and Gamut Mapping

The color space compression mode is selected by the user via a userinterface or is automatically selected by Rendering intent in the headerof a profile on the source side. The color space compression mode isautomatically selected based on the profile as follows.

“Perceptual” color space compression mode on the JCH color space,

“Relative Colorimetric” color space compression mode on the JCH colorspace,

“Saturation” color space compression mode on the JCH color space, and

“Absolute Colorimetric” color space compression mode on the QMH colorspace.

That is, the JCH space 13 is selected in case of relative colormatching, and the QMH space 14 is selected in case of absolute colormatching.

FIG. 8 is a flowchart showing processing for performing gamut mapping onthe JCH space 13 or QMH space 14.

In order to perform gamut mapping on the color appearance space, aprofile designated by the user is loaded from the output profile 46(S81).

In general, an ICC profile for an output device stores a determinationLUT (gamut Tag) that inputs XYZ values or Lab values to determine if thevalues fall inside or outside of the color gamut (to be referred to as“color gamut inside/outside determination” hereinafter). However, sincethe XYZ values are determined with reference to D50 or D65 as thecharacteristics of the colorimetric light source, these values cannot bedirectly used in the color gamut inside/outside determination accordingto ambient light. Hence, the LUT (gamut Tag) for the color gamutinside/outside determination is not used. Instead, CMYK to XYZrelationship data is extracted from a conversion LUT (AtoB0 Tag or thelike) used to perform CMYK to XYZ conversion, which is stored in theoutput profile 42 (S82), and the extracted data is used. Since theoutput profile 42 stores viewing conditions 2, viewing conditions 2 areextracted from the output profile 42 (S83).

Since the XYZ values of the CMYK to XYZ relationship data extracted instep S82 are data determined with reference to D50 or D65 ascolorimetric light, these XYZ values must be corrected to those based onthe ambient light reference. Hence, the XYZ values of a colorimetriclight reference are converted into data on the human color appearancespace JCH using the color appearance model based on the white point ofthe D50 light source (in case of the D50 reference), the illuminancelevel, the state of surrounding light, and the like as the colorimetricconditions. Then, the converted values are inversely converted againinto XYZ values using the color appearance model based on, e.g., thewhite point of the D65 light source, the illuminance level, the state ofsurrounding light, and the like as viewing conditions 2 different fromthe colorimetric conditions, thus obtaining XYZ values of the ambientlight reference (S84) . In this way, in step S84 the relationship fromdevice CMYK values to XYZ values of the ambient light reference isobtained. Next, the color gamut of the output device on the JCH or QMHcolor space is calculated based on the CMYK to ambient light XYZrelationship data obtained in step S84 (S85).

For example, the XYZ values of the ambient light reference correspondingto the following eight points are calculated using the CMYK to ambientlight XYZ relationship data obtained in step S84. Furthermore, byconverting these XYZ values into coordinate values on the human colorappearance space JCH or QMH based on viewing conditions 2 using thecolor appearance model, the color gamut of the output device on the JCHor QMH color space can be approximated by a dodecahedron shown in FIG.9.

Red (C: 0%, M: 100%, Y: 100%, K: 0%) Yellow (C: 0%, M: 0%, Y: 100%, K:0%) Green (C: 100%, M: 0%, Y: 100%, K: 0%) Cyan (C: 100%, M: 0%, Y: 0%,K: 0%) Blue (C: 100%, M: 100%, Y: 0%, K: 0%) Magenta (C: 0%, M: 100%, Y:0%, K: 0%) White (C: 0%, M: 0%, Y: 0%, K: 0%) Black (C: 0%, M: 0%, Y:0%, K: 100%)

In the color gamut approximated by the dodecahedron, if a point insidethe color gamut, i.e., an intermediate point between White and Black onthe achromatic color axis and a point (JCH values or QMH values) of aninput color signal which is to undergo inside/outside determination arelocated on the same side, it is determined that the input color signalfalls inside the color gamut. If these points are located on theopposite sides, it is determined that the input color signal fallsoutside the color gamut.

Based on the result of the color gamut inside/output determination instep S85, gamut mapping is executed (S86). FIGS. 10A and 10B show theconcept of color space compression on the JCH color appearance space.FIGS. 11A and 11B show the concept of color space compression on the QMHcolor appearance space. An input color signal which is determined by theinside/output determination to fall outside the color gamut of theoutput device is mapped inside the color gamut to preserve a hue angle h(or H) on the JCH or QMH color appearance space. This mapping result isstored in an LUT which has the JCH color appearance space as aninput/output color space in case of relative color matching, or in anLUT which has the QMH color appearance space as an input/output colorspace in case of absolute color matching.

FIGS. 12A and 12B show the concept of gamut mapping between differentdevices. In FIGS. 12A and 12B, the broken line represents the colorgamut of an input device, and the solid line represents that of anoutput device. On the JCH color appearance space, the level of J(lightness) is normalized based on the light source white points ofviewing conditions 1 and 2 (to be abbreviated as “white point 1” and“white point 2” hereinafter in some cases), respectively. For thisreason, J does not depend on the illuminance levels of viewingconditions 1 and 2 (to be abbreviated as “illuminance level 1” and“illuminance level 2” hereinafter in some cases). On the other hand, onthe QMH color appearance space, the level of Q (brightness) changesdepending on illuminance level 1 and illuminance level 2. Therefore, inrelative color matching, white point 1 becomes white point 2 intact. Onthe other hand, in absolute color matching, if illuminance level1>illuminance level 2, white point 1 is mapped on white point 2. On theother hand, if illuminance level 1<illuminance level 2, white point 1 isoutput as gray since it is lower than white point 2.

Creation of Data Depending on Viewing Conditions 2

The conversion LUT 16 is created using the data creation unit 47.

FIG. 13 is a flowchart showing processing for recreating the conversionLUT 16 corresponding to ambient light.

In general, an ICC profile for an output device stores an LUT (BtoA0 Tagor the like) used to convert XYZ or Lab values into CMYK or RGB valuesof a device in a format including gamut mapping. However, since XYZvalues to be input to the LUT are data which are determined withreference to D50 or D65, that LUT cannot be directly used as aconversion LUT according to ambient light.

Hence, as in gamut mapping, a conversion LUT (AtoB0 Tag or the like)used to perform CMYK to XYZ conversion stored in the output profile 46is loaded (S71). Then, CMYK to XYZ relationship data is extracted fromthe conversion LUT (S72). Note that the CMYK values of the CMYK to XYZrelationship data may be other device-dependent colors such as RGBvalues and the like, and XYZ values may be other device-independentcolors such as Lab values. Viewing conditions 2 stored in the outputprofile 46 are extracted (S73).

Since the XYZ values of the extracted CMYK to XYZ relationship data aredata which are determined with reference to D50 or D65, the XYZ valuesof the colorimetric light source reference are corrected to those of theambient light reference (S74) . That is, using the color appearancemodel, the XYZ values of the colorimetric light source reference areconverted into data on the human color appearance space JCH based ontheir colorimetric conditions (the white point of the D50 light source(in case of the D50 reference), the illuminance level, the state ofsurrounding light, and the like). Then, the converted values areinversely converted again into XYZ values based on viewing conditions 2(the white point of the D65 light source, the illuminance level, thestate of surrounding light, and the like), thus converting the XYZvalues of the colorimetric light source reference into those of theambient light reference. In this way, the relationship from device CMYKvalues to XYZ values of the ambient light reference can be obtained.When the ambient light XYZ to CMYK relationship data is optimized by aniteration method or the like using the CMYK to ambient light XYZrelationship data, a conversion LUT 16 corresponding to desired ambientlight can be obtained (S75).

Execution of Color Matching

FIG. 14 shows the concept of color matching processing.

The conversion LUT 11 is created by the data creation unit 41 based onviewing conditions 1. An LUT 132 is created by the gamut mapping unit 44on the JCH color space. An LUT 133 is created by the gamut mapping unit45 on the QMH color space. The conversion LUT 16 is created by the datacreation unit 47 based on viewing conditions 2.

RGB or CMYK input color signals are converted from color signals of aninput device into XYZ signals as device-independent color signals underviewing conditions 1 by the conversion LUT 11. Next, the XYZ signals areconverted into human color appearance signals JCH or QMH based onviewing conditions 1 (the white point of the D50 light source, theilluminance level, the state of surrounding light, and the like) by aforward color appearance model converter 134 or 135. The JCH space isselected in case of relative color matching, or the QMH space isselected in case of absolute color matching.

The color appearance signals JCH and QMH are mapped within the colorgamut of an output device by the LUTs 132 and 133. The gamut-mappedcolor appearance signals JCH and QMH are converted into XYZ signals asdevice-independent color signals under viewing conditions 2 by inversecolor appearance model converters 136 and 137. Note that the inversecolor appearance model converters 136 and 137 execute conversion basedon viewing conditions 2 (the white point of the D65 light source, theilluminance level, the state of surrounding light, and the like). TheXYZ signals are converted into color signals depending on the outputdevice under viewing conditions 2 by the conversion LUT 134.

The RGB or CMYK signals obtained by the aforementioned processing aresent to the output device, and an image represented by the color signalsis printed out. When this printout is viewed under viewing conditions 2,it appears to have the same tint as an original document viewed underviewing conditions 1.

[Color Matching between Device that Handles Object Colors and Devicethat Handles Light-source Colors]

Color matching processing between devices (digital camera, scanner,printer, and the like) that handle object colors of reflecting documentsand the like, and devices (CRT, LCD display, projector, and the like)that handle light-source colors of monitors and the like will bedescribed.

The arrangement and processing of color matching processing (colormatching processing B) between devices that handle object colors andlight-source colors are the same as the color matching processing (colormatching processing A) between devices that handle object colors whichhas been described using FIGS. 3 to 14. Hence, a detailed description ofthe same arrangement and processing will be omitted.

The characteristic feature of color matching processing B lies in thatthe colorimetric conditions and viewing conditions are set incorrespondence with a device that handles object colors of reflectingdocuments and the like, and a device that handles light-source colors ofmonitors and the like, respectively. Color matching processing B will bedescribed in detail below using FIG. 15.

Viewing Conditions for Device that Handles Object Colors

In case of the object colors of reflecting documents and the like, sincelight obtained when ambient light is reflected by an object is perceivedas colors, color appearance depends on ambient light. For viewingconditions 3 for a device that handles object colors, since it can beconsidered that the observer adapts himself or herself to ambient light,the XYZ values of ambient light are set as a white point of the viewingconditions.

Viewing Conditions for Device that Handles Light-source Colors

On the other hand, in case of light-source colors of monitors and thelike, since a display device itself has a light source different fromambient light, light emitted by the display device (light reflected by ascreen in case of a projector) is perceived as colors. When the displayscreen of the display device fully occupies the visual field of theobserver, it can be considered that the observer adapts himself orherself to the light source of the display device. On the other hand,when the visual field includes the frame of a monitor or the like, theobserver compares an image on the display device with that on areflecting document in some cases. In these cases, it can be consideredthat the observer adapts himself or herself to a white point between thedisplay light source and ambient light (to be referred to as “partialadaptation” hereinafter), and the influence of ambient light must betaken into consideration in addition to the light source of the displaydevice.

Therefore, for viewing conditions 4 for a device that handleslight-source colors, when the observer gazes at a display image, the XYZvalues of a display device white point are set as a white point of theviewing conditions. On the other hand, when the observer compares animage on the display device with that on a reflecting document, a pointbetween the XYZ values of the display device white point and those ofambient light is set as the XYZ values of a white point of the viewingconditions.

Colorimetric Conditions for Device that Handles Object Colors

Since the colorimetric conditions for a device that handles objectcolors require the XYZ values of the ambient color reference, the XYZvalues of ambient light are set as a white point of the colorimetricconditions. Therefore, the white point of the colorimetric conditionsfor the device that handles object colors match that of the viewingconditions of the device that handles object colors.

If R(λ) represents the spectral reflectance characteristics of anobject, and S(λ) represents the spectral reflectance characteristics ofambient light, we have Φ(λ)=R(λ)·S(λ), and the XYZ values of the ambientlight reference can be calculated by:X=k∫ _(λ)Φ(λ)x(λ)dλY=k∫ _(λ)Φ(λ)y(λ)dλZ=k∫ _(λ)Φ(λ)z(λ)dλk=100/∫_(λ) S(λ)y(λ)dλ  (1)where x(λ), y(λ), and z(λ) are color-matching functions.

That is, when the spectral reflectance characteristics for respectivepatches of device colors are stored in advance in a profile, and thoseof actual ambient light are acquired by an ambient light sensor or thelike, the XYZ values of the ambient light reference can be dynamicallycalculated. Furthermore, a profile 21 corresponding to ambient light canbe dynamically obtained using an iteration method or the like for theobtained relationship between the device colors and XYZ values. Notethat the profile corresponding to ambient light, which is to bedynamically created, is not limited to that on the source side but itmay be that on the destination side.

Colorimetric Conditions for Device that Handles Light-source Colors

On the other hand, since the colorimetric conditions for a device thathandles light-source colors require the XYZ values of a display devicelight source reference, the XYZ values of a display device white pointare set as a white point of the colorimetric conditions. Therefore, whenthe observer gazes at a display image, this white point matches that ofthe viewing conditions of the device that handles light-source colors.However, in case of partial adaptation, this white point does not matchthat of the viewing conditions of the device that handles light-sourcecolors.

Let Φ(λ) be the spectral emission characteristics of the display device.Then, the XYZ values of the display device light source reference can becalculated by:X=k∫ _(λ)Φ(λ)x(λ)dλY=k∫ _(λ)Φ(λ)y(λ)dλZ=k∫ _(λ)Φ(λ)z(λ)dλk=683 [lumen/W]  (2)where x(λ), y(λ), and z(λ) are color-matching functions.

As a profile 26 for the device that handles light-source colors, thesame profile can be used even if the viewing conditions are changed, aslong as there is no particular influence of ambient light due toreflection on the display device surface.

Color Matching Processing B

The profile 21 that uses the XYZ values of the ambient light referenceis created for a device that handles object colors. The white point ofambient light is used as that of viewing conditions 3.

On the other hand, a profile 26 that uses the XYZ values of the displaydevice light source reference is created for a device that handleslight-source colors. As the white point of viewing conditions 4, thedisplay device white point is used when the observer gazes at an imageon the display device, and the white point between the display devicewhite point and the white point of ambient light is used when theobserver compares an image on the display device and that on areflecting document.

Device color signals of the device that handles object colors areconverted into device-independent color signals XYZ using the profile21, and the converted signals are then converted into color appearancesignals JCH or QMH by a forward color appearance model converter 22using viewing conditions 3. Furthermore, the converted color appearancesignals JCH or QMH are mapped within the color gamut of the destinationside device on the JCH color space or QMH color space. The gamut-mappedcolor appearance signals JCH or QMH are converted intodevice-independent color signals XYZ by an inverse color appearancemodel converter 25 using viewing conditions 4, and the converted signalsare converted into device color signals of the device that handleslight-source colors using the profile 26.

In the example of FIG. 15, the source side is a device that handlesobject colors, and the destination side is a device that handleslight-source colors. On the contrary, the same processing can be appliedwhen the source side is a device that handles light-source colors andthe destination side is a device that handles object colors.Furthermore, the same processing can be applied even when both thesource and destination sides are devices that handle light-sourcecolors. That is, by appropriately setting the colorimetric conditionsand viewing conditions depending on whether a device handles objectcolors or light-source colors, various combinations can be coped with.

Also, the profile for the device that handles object colors may storespectral reflectance characteristics for respective patches of devicecolors so as to generate the XYZ values of the ambient light reference.

[Color Matching Processing Using Colorimetric Value Files]

Color matching processing (color matching processing C) between devicesthat handle object colors and/or light-source colors using colorimetricvalue files will be described below. Note that a detailed description ofthe same arrangement and processing as those in the above descriptionwill be omitted. Note that the difference between color matchingprocessing C and color matching processing A or B is that colorimetricvalue files are used in place of profiles.

In case of the device that handles object colors, the white value of thecolorimetric conditions matches that of the viewing conditions.Therefore, when the colorimetric conditions prepared in advance aredifferent from the viewing conditions, the colorimetric values of theviewing conditions are calculated from those of the colorimetricconditions using the color appearance model. Then, a profile is createdbased on the calculated colorimetric values.

On the other hand, in case of the device that handles light-sourcecolors, the white point of the colorimetric conditions is that of thedisplay device, and does not always match that of the viewingconditions. Therefore, a profile is created from the colorimetricvalues, and a white point for the viewing conditions is set according tothe viewing situations.

Color matching processing C will be described below using FIG. 15.

A colorimetric value file 29 that utilizes the XYZ values of the ambientlight reference is used for a device that handles object colors. When acolorimetric value file 32 that utilizes the XYZ values of the displaydevice light source reference is used for a device that handleslight-source colors, the profiles 21 and 26 can be directly created fromthe relationship with device colors by an iteration method or the like.

However, it is difficult to prepare for actual colorimetric values ofthe ambient light reference in advance. This is because various kinds ofactual ambient light are considered, and it is impossible to prepare forcolorimetric values corresponding to all these kinds of ambient light.

Hence, as the colorimetric value file for the device that handles objectcolors, colorimetric values of a standard light source (the D50 lightsource, A light source, or the like) reference are prepared in advance.Using the color appearance model, colorimetric values of the viewingconditions (the white point of ambient light, the illuminance level, thestate of surrounding light, and the like) are calculated from those ofthe colorimetric conditions. More specifically, forward color appearancemodel conversion is applied to the colorimetric value file of thecolorimetric conditions using the colorimetric conditions. Then, inversecolor appearance model conversion is executed using the viewingconditions (viewing conditions 3: the white point of ambient light, theilluminance level, the state of surrounding light, and the like) toestimate the colorimetric values of the viewing conditions.

In this way, when the colorimetric conditions and viewing conditions aregiven to the forward color appearance model conversion and inverse colorappearance model conversion to convert colorimetric values under thecolorimetric conditions into those under the viewing conditions,predicted values of the XYZ values of the ambient light reference can beobtained.

As for the colorimetric value file of the device that handleslight-source colors, since the colorimetric values of the display devicelight source reference need only be stored, they need not be convertedaccording to the viewing conditions (ambient light).

Upon loading the colorimetric value file, whether a device that uses thecolorimetric value file is the one that handles object colors orlight-source colors is determined. In case of the device that handlesobject colors, the forward color appearance model conversion and inversecolor appearance model conversion are applied to convert colorimetricvalues under the colorimetric conditions into those under the viewingconditions. When the colorimetric conditions match the viewingconditions, this conversion processing need not be executed.

In FIG. 15, the source side is a device that handles object colors, andthe destination side is a device that handles light-source colors.

On the source side, it is determined that the device type is a devicethat handles object colors, and forward color appearance modelconversion 28 according to the colorimetric conditions and inverse colorappearance model conversion 27 according to the viewing conditions areapplied to the colorimetric value file 29 to calculate colorimetricvalues according to the viewing conditions. Then, the profile 21 iscreated from the colorimetric values according to the viewingconditions. Input values undergo conversion using the profile 21according to viewing conditions 3, and also forward color appearancemodel conversion 22 according to viewing conditions 3.

On the other hand, on the destination side, it is determined that thedevice type is a device that handles light-source colors, and theprofile 26 is created from the colorimetric value file 32 according tothe colorimetric conditions. That is, control is made not to applyforward color appearance model conversion 31 and inverse colorappearance model conversion 30 to the colorimetric value file 32. Then,inverse color appearance model conversion 25 is executed according toviewing conditions 4, and conversion using the profile 26 is executedaccording to the colorimetric conditions of the colorimetric value file32.

When the display screen of the display device fully occupies the visualfield of the observer, it can be considered that the observer adaptshimself or herself to the light source of the display device. Hence, thesame conditions as the colorimetric conditions are set as viewingconditions 4. On the other hand, when the frame or the like of a monitoris included in the visual field, or when the observer compares an imageon the display device with that on a reflecting document, a white pointbetween the light source (colorimetric conditions) of the display deviceand ambient light is set as viewing conditions 4.

In this manner, according to FIG. 15, the profiles can be appropriatelycalculated from the colorimetric values in correspondence with thedevice types.

Modification of Embodiment

In the example of the above description, the colorimetric value file isconverted prior to creation of the profile. However, by applying similarcolorimetric value conversion upon conversion of color signals aftercreation of the profile, desired XYZ values of the ambient lightreference may be obtained.

As the colorimetric value data 29 for the device that handles objectcolors, the spectral reflectance characteristics may be stored in placeof the XYZ values of the ambient light reference.

Upon converting the colorimetric values of the colorimetric conditionsinto those according to the viewing conditions (the inverse colorappearance model conversion 27 or 30, and the forward color appearancemodel conversion 28 or 31), only white points are used in comparisonbetween the colorimetric conditions and viewing conditions in somecases. In such case, color adaptation conversion may be used in place ofthe inverse color appearance model conversion and the forward colorappearance model conversion.

As the color appearance model in the above embodiment, CIECAM97s,CIECAM02, CIECAT02, CIECAT94, Bradford conversion, Von Kries conversion,and the like may be used.

The color spaces (e.g., RGB, XYZ, JCh, and QMh) of color signals in theabove embodiment are merely examples of color spaces that can be used,and other color spaces such as CMYK, Lab, and the like may be used.

As many apparently widely different embodiments of the present inventioncan be made without departing from the spirit and scope thereof, it isto be understood that the invention is not limited to the specificembodiments thereof except as defined in the appended claims.

This application claims the benefit of Japanese Patent Application No.2005-182521 filed on June 22, 2005, which is hereby incorporated byreference herein in its entirety.

1. A method of generating a profile used in conversion between device-dependent color data and device-independent color data from a file which stores colorimetric values of a device, the method comprising: using a processor to perform the steps of: obtaining at least one viewing condition; converting the colorimetric values under a colorimetric condition stored in the file into colorimetric values under the viewing condition; determining a type of the device from the colorimetric condition of the colorimetric values stored in the file; and generating the profile based on a determination result obtained in the determining step, wherein the generating step includes generating the profile using the colorimetric values under the colorimetric condition stored in the file when the type of the device is a device that handles light-source colors, and generating the profile using the colorimetric values under the viewing condition obtained in the converting step when the type of the device is a device that handles object colors.
 2. The method according to claim 1, wherein the obtaining step includes obtaining a white point, between a white point of the device and a white point of ambient light, set as the viewing condition in a case of the device that handles the light-source colors.
 3. The method according to claim 1, wherein said converting step includes performing forward conversion according to the colorimetric condition and inverse conversion according to the viewing condition.
 4. The method according to claim 1, wherein the generating step includes generating the profile using the colorimetric values under the colorimetric condition stored in the file when the type of the device is the device that handles the object colors and the colorimetric condition match the viewing condition.
 5. A non-transitory computer-readable storage medium retrievably storing a computer program comprising program code for causing a computer to perform a method of generating a profile used in conversion between device-dependent color data and device-independent color data from a file which stores colorimetric values of a device, the method comprising the steps of: obtaining at least one viewing condition; converting the colorimetric values under a colorimetric condition stored in the file into colorimetric values under the viewing condition; determining a type of the device from the colorimetric condition of the colorimetric values stored in the file; and generating the profile based on a determination result obtained in the determining step, wherein the generating step includes generating the profile using the colorimetric values under the colorimetric condition stored in the file when the type of the device is a device that handles light-source colors, and generating the profile using the colorimetric values under the viewing condition obtained in the converting step when the type of the device is a device that handles object colors.
 6. A color processing apparatus for generating a profile used in conversion between device-dependent color data and device-independent color data from a file which stores colorimetric values of a device, the apparatus comprising: an obtainer unit constructed to obtain at least one viewing condition; a converter unit constructed to convert the colorimetric values under a colorimetric condition stored in the file into colorimetric values under the viewing condition; a determiner unit constructed to determine a type of the device from the colorimetric condition of the colorimetric values stored in the file; and a generator unit constructed to generate the profile based on a determination result provided by the determiner, wherein the generator unit generates the profile using the colorimetric values under the colorimetric condition stored in the file when the type of the device is a device that handles light-source colors, and generates the profile using the colorimetric values under the viewing condition provided by the converter unit when the type of the device is a device that handles object colors. 